package org.babelstudio.android.PDFImageReader;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class MainActivity extends Activity implements OnClickListener {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        Button btnOpen = (Button)findViewById(R.id.OpenBtn);
        btnOpen.setOnClickListener(this);
    }

	@Override
	public void onClick(View view) {
		Intent toIntent = new Intent(MainActivity.this, ViewActivity.class);
		Bundle filePath = new Bundle();
		filePath.putString("FilePath", ((EditText)findViewById(R.id.FilePath)).getText().toString());
		toIntent.putExtras(filePath);
		startActivityForResult(toIntent, 100);
	}
}